package com.techeritem.service;



import com.techeritem.entity.Login;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service
public class LoginService {


    @Value("${login.salt}")
    private String salt;

    public boolean authenticate(Login login) {
        // 使用盐值进行简单的认证逻辑
        String hashedPassword = hashPassword(login.getPassword(), salt);
        return "hashedPassword".equals(hashedPassword);
    }

    private String hashPassword(String password, String salt) {
        // 简单的哈希函数
        return password + salt;
    }
}